<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="https://cnodejs.org/api/v1/topics" method="get">
        <input type="submit" value="提交按钮">
        <!-- <input type="text" name="page"> // 能记住历史记录 -->
        <!-- <input type="text" name="tab"> -->
        <!-- <input type="text" name="limit">  //能记住历史记录 -->
        <input type="text" value="提交按钮">
        </form>
        <div></div>
    <script>
        document.forms[0].onsubmit = function(e) {
            e.preventDefault();
            var data = new FormData(document.forms[0]);
            console.log(data);
            console.log(data.get('limit')); //输出limit表单输入内容
            data.append('age',18);
            console.log(data.get('age'));            
        }
    </script>
</body>
</html>